package $packageName.controller;

import $packageName.service.$serviceName;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/$entityName")
public class $controllerName {

    private final $serviceName $serviceInstance;

    public $controllerName($serviceName $serviceInstance) {
        this.$serviceInstance = $serviceInstance;
    }

    // 示例方法
    @GetMapping
    public Object getAll() {
        return $serviceInstance.getAll();
    }
}